﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Vit.Common
{
    public abstract class DataConverter<T1, T2> : IDataConverter
    {
        public Type FromType { get { return typeof(T1); } }
        public Type ToType { get { return typeof(T2); } }

        #region IDataConverter Members

        public abstract object Convert(object obj);

        #endregion

        #region IProvider Members

        public string Name
        {
            get
            {
                return string.Format("DataConverter:{0}|{1}", FromType, ToType);
            }
        }

        #endregion
    }
}
